package Particles 
{
	import Tools.RandTool;
	
	public class SpurtEmitter extends ParticleEmitter
	{
		public var startRotationHigh:Number = 0;
		public var startScale:Number = 0;
		public var ySpeedHigh:Number = 0;
		public var friction:Number = 0;
		public var lifeHigh:int = 0;
		public var xSpeedLow:Number = 0;
		public var ySpeedLow:Number = 0;
		public var animSpeedRange:int = 0;
		public var endScale:Number = 0;
		public var startAlpha:Number = 0;
		public var dRotationHigh:Number = 0;
		public var gravityLow:Number = 0;
		public var windLow:Number=0;
		public var windHigh:Number=0;
		public var lifeLow:int = 0;
		public var endAlpha:Number = 0;
		public var gravityHigh:Number = 0;
		public var xSpeedHigh:Number = 0;
		public var dRotationLow:Number = 0;
		public var startRotationLow:Number = 0;
		
		public function SpurtEmitter()
		{
			super();
		}
		override protected function appendParticle(particle:Particle):void
		{
			var spurtParticle:SpurtParticle=particle as SpurtParticle;
			spurtParticle.duration = RandTool.randNumber(lifeLow, lifeHigh);
			spurtParticle.dRotation = RandTool.randNumber(dRotationLow, dRotationHigh);
			spurtParticle.dx = RandTool.randNumber(xSpeedLow, xSpeedHigh);
			spurtParticle.dy = RandTool.randNumber(ySpeedLow, ySpeedHigh);
			spurtParticle.ax = RandTool.randNumber(windLow, windHigh);
			spurtParticle.ay = RandTool.randNumber(gravityLow, gravityHigh);
			spurtParticle.startAlpha = startAlpha;
			spurtParticle.endAlpha = endAlpha;
			spurtParticle.startScale = startScale;
			spurtParticle.endScale = endScale;
			spurtParticle.friction = friction;
			particle.obj.rotation = RandTool.randNumber(startRotationLow, startRotationHigh);
			particle.animSpeed = animSpeed + RandTool.randInt(0, animSpeedRange);
		}
	}
}